package com.cqc.web;


import com.cqc.service.UserService;
import com.cqc.service.User1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author mike
 * @since 2023-09-25
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    UserService userService;


    /**
     * http://localhost:8080/user/migrate
     */
    @GetMapping("migrate")
    public ResponseEntity<String> migrate() {
        userService.migrate();
        return ResponseEntity.ok("数据迁移中");
    }

    /**
     * http://localhost:8080/user/migrate2
     */
    @GetMapping("migrate2")
    public ResponseEntity<String> migrate2() {
        userService.migrate2();
        return ResponseEntity.ok("数据迁移中2");
    }

}
